var mongoose = require('./db')

var TaskSchema = mongoose.Schema({
    taskName: String,       //任务名称
    taskDetail: String,     //任务简介
    iphone: Number,         //任务紧急联系
    password: {            //密码设置
        type: String,
        default: null
    },
    taskReturn: {           //任务赏金
        type: Number,
        default: 0
    },
    memberSum: {            //任务人数
        type: Number,
        default: -1
    },
    startTime: String,      //起始时间
    endTime: String,        //结束时间
    city: String,      //任务发布地点定位
    taskCreatTime: String   //任务创始时间
})

var Task = mongoose.model('Task', TaskSchema, 'Task')

module.exports = Task